<%@page import="org.apache.log4j.Logger" %>
<%@page isErrorPage="true" %>
<% Logger logger = Logger.getLogger("MovieSystem.WebUI"); %>

Error has occured:<br />
<%= exception.getMessage() %>

<%    
    logger.debug("Error in jsp page",exception);

    String message = exception.getMessage();
    if (message == null)
        message = "Holy shit :)";
   
%>

<jsp:forward page="index.jsp">
    <jsp:param name="action" value="Error" />
    <jsp:param name="message" value="<%= message%>" />
</jsp:forward>